import time

from page.app_page_enter_home import AppPageEnterHome
from page.page_add import PageAdd
from page.page_login import PageLogin
from page.page_pay import PagePay
from page.page_search import PageSearch
from script import log
from tools import Tools


class TestPay(object):
    def test_pay_success(self, driver,login,search,add_cart):
        self.pay=PagePay(driver)
        self.pay.buy_cart('asd12345')
        self.result=self.pay.get_pay_result()
        log.info(f'添加购物车结果为：{self.result}')
        assert '我的订单' in self.result


